---
title: Find
description: Find items
keywords:
  - electrodb
  - docs
  - concepts
  - dynamodb
  - FilterExpression
  - ConditionExpression
  - find
layout: ../../../layouts/MainLayout.astro
---

DynamoDB offers three methods to query records: `get`, `query`, and `scan`. In ElectroDB, there is a fourth and fifth type: `find` and `match`. Unlike `get` and `query`, the `find` method does not require you to provide keys, but under the covers it will leverage the attributes provided to choose the best index to query on. Provide the `find` method with all properties known to match a record and ElectroDB will generate the most performant query it can to locate the results. This can be helpful with highly dynamic querying needs. If an index cannot be satisfied with the attributes provided, `scan` will be used as a last resort.

> The Find method is similar to the Match method with one exception: The attributes you supply directly to the `.find()` method will only be used to identify and fulfill your index access patterns. Any values supplied that do not contribute to a composite key will not be applied as query filters. Furthermore, if the values you provide do not resolve to an index access pattern, then a table scan will be performed. Use the `where()` chain method to further filter beyond keys, or use [Match](/en/queries/match) for the convenience of automatic filtering based on the values given directly to that method.

The Find method is useful when the index chosen does not matter or is not known. If your secondary indexes do not contain all attributes then this method might not be right for you. The mechanism that picks the best index for a given payload is subject to improvement and change without triggering a breaking change release version.

import ExampleSetup from "../../../partials/entity-query-example-setup.mdx";

<ExampleSetup />

```typescript
await StoreLocations.find({
  mallId: "EastPointe",
  buildingId: "BuildingA1",
}).go();
```

## Response Format

```typescript
{
  data: Array<YOUR_SCHEMA>,
  cursor: string | undefined
}
```

## Equivalent Parameters

```json
{
  "KeyConditionExpression": "#pk = :pk and begins_with(#sk1, :sk1)",
  "TableName": "StoreDirectory",
  "ExpressionAttributeNames": {
    "#mallId": "mallId",
    "#buildingId": "buildingId",
    "#pk": "gsi1pk",
    "#sk1": "gsi1sk"
  },
  "ExpressionAttributeValues": {
    ":mallId1": "EastPointe",
    ":buildingId1": "BuildingA1",
    ":pk": "$mallstoredirectory#mallid_eastpointe",
    ":sk1": "$mallstore_1#buildingid_buildinga1#unitid_"
  },
  "IndexName": "gsi1pk-gsi1sk-index"
}
```

## Execution Options

import PartialExample from "../../../partials/query-options.mdx";

<PartialExample />
